<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta charset="UTF-8">
    <title>Кабинет Пользователя</title>
    <div th:replace="layouts/favicon :: favicon"></div>
    <link rel="stylesheet" th:href="@{/styles/main.css}">

</head>
<body>
<div th:replace="layouts/header :: header"></div>

<main class="container">
    <div class="login-form">
    <h2>Изменить данные</h2>
    <h4>Привет, <span sec:authentication="name"></span></h4>
    </div>
    <form class="form" method="post" th:action="@{/user/update}">
        <input type="email" name="email" th:value="${email}" placeholder="Введите email">
        <input type="password" name="password" placeholder="Введите password"><br>
        <div class="error" th:text="${error}"></div>

        <button class="button" type="submit">Обновить данные</button>
    </form>
    <form class="form" method="post" th:action="@{/logout}">
        <button class="button" type="submit">Выйти</button>
    </form>
</main>


</body>
</html>